OpenRoads Designer CONNECT Edition

Expression Builder and Expression Components

An expression is built up from left to right, using parentheses to explicitly call functions or group operations. Following are the components of an expression:

Expression Builder dialog

  • String - "Pipe"
  • Integer - 1
  • Double - 8.64
  • Symbol - you can use symbols to supply values to expression evaluators. Symbols can be from an instance via an access string, defined value, or an application-defined method. Following are a few examples:
    • Instance - "ActiveFile.Author". An access string is a limited expression that contains no blank spaces, operators, or variable portions.
    • Value - "System.Math.PI"
    • Method - "System.Math.Sin(1.25)"
  • Operators -
    • Comparison - <, >, <=, >=, =, and <>
    • Conditional If (conditional, true-result, false-result)
    • Arithmetic ^ (exponentiation), *, /, \, Mod, +, and -. The division operator "/" always produces a result of type double. The division operator "\" always produces an integer result.

Civil Element Properties

Civil Properties can be entered in the Expression Builder using the Intellisense pop-ups.

  1. Begin by typing civil and then double-click to select "Civil Element Properties" from the pop-up.
  2. Enter a dot. after "Civil Elements Properties" the next level of property will appear in the pop-up.
  3. Double-click to select the appropriate property.
  4. Repeat steps 2 and 3 until the full expression string is complete which is indicated by the () at the end such as "Civil Element Properties"."Geometry"."Feature"." Feature With Name"." Feature Name"().
  5. If a mistake is made, DELETE the entire expression, and start again. If not the intellisense popup may not work properly.
    1. Example of an Expression: Lookup.GetEntry("Pay_Items","Description",this.Description).Item_Number

      Tip: Double click on desired entry, not ENTER key. Enter key is buggy from the platform.
  6. The property string in the Expression Builder is the same as the property tree in Text Favorites.

To Copy ECExpression from Properties Dialog

An easier way to build civil expression strings is with the Copy ECExpression functionality. The Copy ECExpression functionality is hidden by default.

Copy ECExpression Properties dialog

Set the following configuration variable to enable it CIVILPROPERTYECEXPRESSION = 1.

To copy ECExpression follow the steps given below.

  1. Select a civil element.
  2. Hover over a city property in the Properties dialog, right-click, and select Copy ECExpression.
  3. Open the Expression Builder and Paste the expression.

Expression for Civil Elements

Below is the list of expression for civil elements.

Template Name Expression

Example- CivilExpression.Corridor_TemplateName(x) where x is the template drop index starting at zero

Corridor Name Expression

Example- CivilExpression.Corridor_Name()

Horizontal Alignment Name Expression

Example- CivilExpression.Corridor_HorizontalAlignmentName()

Template Drop Station Range Expression

Example- CivilExpression.Corridor_TemplateDropStartStation(x) where x is the template drop index starting at zero

CivilExpression.Corridor_TemplateDropEndStation(x)

Vertical Alignment Name Expression

Example- CivilExpression.Corridor_VerticalAlignmentName()

Template Name Expression

Example- CivilExpression.SurfaceTemplate_TemplateName()